package demo.dcs;

import java.util.UUID;


public class DefaultGenerateTraceId implements GenerateTraceId{
	
	static{
		UUID.randomUUID().getLeastSignificantBits();
		UUID.randomUUID().getLeastSignificantBits();
		UUID.randomUUID().getLeastSignificantBits();
	}


	@Override
	public String generateTraceId() {
		
		return String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "");
	}

	@Override
	public String generateSpanId() {
		
		return String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "");
	}
	
	public static void main(String[] args) {
		System.out.println(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", ""));
	}



}
